package cn.nlsde.interceptor;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;
import java.util.Arrays;

/**
 * Created by zwj on 2016/10/9.
 */
public class PaginationInterceptor implements MethodBeforeAdvice {

    public final Logger logger = LoggerFactory.getLogger(PaginationInterceptor.class);

    @Override
    public void before(Method method, Object[] objects, Object o) throws Throwable {
        logger.info("{} and {}", method.getName(), Arrays.toString(objects));
    }
}
